import api from './request'

export const permissionApi = {
    // 分页获取权限列表
    getPermissions: (pageIndex = 1, pageSize = 10) => {
        return api.get('/permission/paged', {
            params: { pageIndex, pageSize }
        })
    },
    // 新增权限
    createPermission: (data) => {
        return api.post('/permission/create', data)
    },
    // 删除权限
    removePermission: (data) => {
        return api.post('/permission/remove', data)
    },
    // 激活权限
    enablePermission: (id) => {
        return api.post(`/permission/enable/${id}`)
    },
    // 禁用权限
    disablePermission: (id) => {
        return api.post(`/permission/disable/${id}`)
    }
} 